package myjava.statico;

public class Root3 {

   public static void main(String[] args) {
   
      Foo o1 = new Foo();
      Faa o2 = new Faa();
      Foo o3 = new Faa();

      o1.exec();
      o2.exec();
      o3.exec();
   }
}

class Foo {

   public static void doIt() {
      System.out.println("doIt in Foo");
   }

   public void exec() {
      this.doIt();
   }
}

class Faa extends Foo {

   public static void doIt() {
      System.out.println("doIt in Faa");
   }

   @Override
   public void exec() {
      this.doIt();
   }
}